package cn.wolfcode.crud.mapper;

import cn.wolfcode.crud.domain.Employee;
import cn.wolfcode.crud.qo.EmployeeQuerObjcet;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);
    //分页查询

    List<Employee> queryFormList(EmployeeQuerObjcet eqo);

    void insertEOID(@Param("id") Long id, @Param("ids") Long[] ids);

    void deleteER(Long id);

    Employee selectlog(@Param("username") String username, @Param("password") String password);

    void updatePwd(@Param("newPassword") String newPassword, @Param("id") Long id);

    void batchDelete(@Param("ids") Long[] ids);

    Employee checkName(String name);

    void saveStatus(@Param("id") long id, @Param("status") boolean status);

    List<Employee> selectByRole(@Param("sns") String ... sns);
}